home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / resources / templates / new < prev    next >
Encoding:
Extensible Markup Language  |  2007-11-12  |  2.9 KB  |  78 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml"
  4.       xmlns:t="http://www.participatorypolitics.org/"
  5.       xmlns:i18n="http://www.participatoryculture.org/i18n"
  6.       eventCookie="@@@eventCookie@@@" dtvPlatform="@@@dtvPlatform@@@">
  7. <head>
  8.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9.  
  10.     <link href="resource:css/main.css" rel="stylesheet" type="text/css" />
  11.     <t:include filename="dynamic.js" />
  12.     <t:include filename="settings.js" />
  13.     <script type="text/javascript" src="resource:templates/osxdnd.js" />
  14.     <t:execOnLoad><![CDATA[
  15.  
  16. filters.switchNewItemsChannel("new")
  17. sorts.switchUnwatchedFirstChannel("new")
  18. views.nonContainerItems.recomputeFilter(views.newWatchableItems)
  19.  
  20. def searchFilter(x):
  21.     return filters.matchingItems(x, app.controller.newVideosSearchTerm)
  22.  
  23. matchingItems = views.newWatchableItems.filter(lambda x:searchFilter(x) and x.getFeedURL() != "dtv:singleFeed",sortFunc=sorts.itemSortNew.sort, resort=True)
  24.  
  25. def updateSearchString(newSearch):
  26.     if len(newSearch) == 0:
  27.         app.controller.newVideosSearchTerm = None
  28.     else:
  29.         app.controller.newVideosSearchTerm = newSearch
  30.     views.newWatchableItems.recomputeFilter(matchingItems)
  31.  
  32. def setSortBy(by, section, handle):
  33.     sorts.itemSortNew.setSortBy(by)
  34.     views.newWatchableItems.recomputeSort(matchingItems)
  35.     handle.forceUpdate()
  36.  
  37. ]]>
  38.     </t:execOnLoad>
  39.     <t:execOnUnload><![CDATA[
  40. matchingItems.unlink()
  41. ]]>
  42.     </t:execOnUnload>
  43.  
  44. </head>
  45.  
  46. <body onkeydown="sendKeyToSearchBox(event);">
  47.  
  48. <!-- TITLE BAR ************************************************************ -->
  49. <div id="main-titlebar">
  50.     <div id="main-icon" class="noborder"><img src="resource:images/newvideos-icon.png" /></div>
  51.     <h1 id="main-title" i18n:translate="">New</h1>
  52.     <div id="search-box-container">
  53.         <div t:showIf="app.controller.newVideosSearchTerm is None">
  54.             <input id="search-box" type="search" onfocus="onSearchFocus(this)" onblur="endEditSearch()" value="***_('Find')***" />
  55.         </div>
  56.         <div t:showIf="app.controller.newVideosSearchTerm is not None">
  57.             <input id="search-box" type="search" onfocus="onSearchFocus(this)" onblur="endEditSearch()" value="***app.controller.newVideosSearchTerm***" searching="1"/>
  58.         </div>
  59.     </div>
  60. </div>
  61. <!-- / TITLE BAR -->
  62.  
  63. <div id="main-container">
  64.     <div t:updateForView="matchingItems">
  65.         <div t:hideIf="matchingItems.len() == 0">
  66.             <t:executeTemplate filename="static-tab-sort-bar" 
  67.                 itemSort="sorts.itemSortNew"
  68.                 section="'main'" />
  69.         </div>
  70.     </div>
  71.     <div id="main-unwatched">
  72.         <div t:repeatForView="matchingItems" t:repeatTemplate='download-item' t:containerDiv="true" />
  73.     </div>    
  74. </div>
  75.  
  76. </body>
  77. </html>
  78.